package avicit.rme.back.workflow.userselect;

// 自定义选人、特殊权限操作人自定义选人

/**
import avicit.platform6.api.bpm.eventInterface.CommonRestUserSelectInterface;
import avicit.platform6.bpmclient.dto.org.Actor;
import avicit.platform6.bpmclient.dto.org.Actors;
import avicit.platform6.bpmclient.dto.org.actor.GroupActor;
import avicit.platform6.bpmclient.dto.org.actor.PositionActor;
import avicit.platform6.bpmclient.dto.org.actor.RoleActor;
import avicit.platform6.bpmclient.dto.org.actor.UserActor;
import avicit.platform6.commons.utils.ComUtil;
import avicit.platform6.core.rest.msg.ResponseMsg;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;

@RestController
@RequestMapping("/api/demo/bpm/TestUserSelect/")
public class TestUserSelect implements CommonRestUserSelectInterface {

    @Override
    @PostMapping("/getActors/v1")
    public ResponseMsg<Actors> getActors(@RequestBody() Map<String, String> arg) {

        ResponseMsg<Actors> responseMsg = new ResponseMsg();

        // 默认流程变量开始
        // 流程实例ID
        String processInstanceId = arg.get("processInstanceId");
        // 流程执行ID
        String executionId = arg.get("executionId");
        // 业务表单ID
        String formId = arg.get("startFormId");
        // 当前登录用户ID
        String processDefId = arg.get("loginUserId");
        // 流程节点标识
        String activityName = arg.get("activityName");
        // 当前节点标识
        String fromActivityName = arg.get("fromActivityName");
        // 默认流程变量结束

        List<Actor> actorlist = new ArrayList<>();
        // 用户
        Actor userActor = new UserActor();
        // 用户 ID
        userActor.setId("1");
        // 用户姓名
        userActor.setName("平台管理员");
        // 类别
        userActor.setType("user");

        // 角色
        Actor roleActor = new RoleActor();
        // 角色 ID
        roleActor.setId("1");
        // 角色名称
        roleActor.setName("普通用户");
        // 类别
        roleActor.setType("role");

        // 群组
        Actor groupActor = new GroupActor();
        // 群组 ID
        groupActor.setId("1");
        // 群组名称
        groupActor.setName("一般群组");
        // 类别
        groupActor.setType("group");

        // 岗位
        Actor positionActor = new PositionActor();
        // 岗位 ID
        positionActor.setId("1");
        // 岗位名称
        positionActor.setName("普通员工");
        // 类别
        positionActor.setType("position");

        actorlist.add(userActor);
        actorlist.add(roleActor);
        actorlist.add(positionActor);
        actorlist.add(groupActor);

        Actors actors = new Actors();
        actors.setActorlist(actorlist);
        actors.setId(ComUtil.getId());
        responseMsg.setResponseBody(actors);
        return responseMsg;
    }
}
*/